package com.sise.cn.api.enumerate;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;

/**
 * @author 龚秀峰
 * @date 2019-10-13
 */
@AllArgsConstructor
@Getter
public enum ServerResponseEnum {
    /**
     * 请求处理各种情况的枚举
     */
    SUCCESS(0, "成功"),
    TASK_ERROR(5, "任务调度失败"),
    DATE_FORMATTER_ERROR(6, "日期转换失败"),
    EXPIRED(7, "此Token已失效"),
    BUSINESS_EXCEPTION(8, "业务逻辑异常"),
    PARAMETER_ERROR(9, "参数校验失败"),
    ERROR(10, "系统错误"),
    ACCOUNT_NOT_EXIST(11, "账号不存在"),
    DUPLICATE_ACCOUNT(12, "账号重复"),
    ACCOUNT_IS_DISABLED(13, "账号被禁用"),
    INCORRECT_CREDENTIALS(14, "账号或密码错误"),
    NOT_LOGIN_IN(15, "账号未登录"),
    UNAUTHORIZED(16, "没有权限"),
    REGISTERED_FAIL(17, "注册失败"),
    USER_SAVE_FAIL(18, "用户保存失败"),
    USER_SELECT_FAIL(19, "用户查询失败"),
    USER_UPDATE_FAIL(20, "用户更新失败"),
    USER_DELETE_FAIL(21, "用户删除失败"),
    USER_REPEAT_ERROR(22, "用户名已存在"),
    ORDER_SAVE_FAIL(120,"订单保存失败"),
    ORDER_DELETE_FAIL(121,"订单删除失败"),
    ORDER_LIST_FAIL(122,"订单查询失败"),
    ORDER_UPDATE_FAIL(123,"订单信息更新失败"),
    ORDER_REPEAT_ERROR(124,"该订单号出现重复"),
    ORDER_NOT_EXIST_ERROR(125,"该订单号不存在订单"),
    ORDER_PAY_FAIL(126,"订单付款失败"),
    ORDER_STATUS_CHANGE_FAIL(127,"订单状态改变失败"),
    ORDER_RELATION_NONE(128,"订单未关联订单项"),
    ORDER_ITEM_ASSOCIATE_PRODUCT_ERROR(129,"订单项关联商品失败"),
    ORDER_ITEM_SELECT_FAIL(130,"订单项查询失败"),
    ORDER_ITEM_ASSOCIATE_PRODUCT_NONE(131,"订单项未关联商品"),
    ;
    @Setter
    Integer code;
    @Setter
    String message;

}
